<?php

namespace app\qsapi\controller;

use app\qsapi\service\AdPointService;
use think\response\Json;

/**
 * 游戏模块
 */
class AdPoint extends BaseController
{
    protected $needLogin = ['clickadpoint'];

    /**
     * 点击弹窗广告,埋点接口
     * @return Json
     */
    public function clickAdPoint(): Json
    {

        //区分是否为登录状态
        try {
            $memberId = $this->request->getMemberId();
        }catch (\Throwable $e){
            $memberId = 0;
        }

        $adService = new AdPointService();
        return json($adService->clickAdPoint($memberId, $this->request->post()));
    }



}
